<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>修改自定义宏标记</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
	</head>
	<body>
		<form action="mytag_edit.php" method="post" enctype="multipart/form-data" name="form1">
			<input type="hidden" name="aid" value="<?php echo $aid?>">
			<input type="hidden" name="dopost" value="saveedit">
			<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>">
			<table class="table shadow-sm my-3">
				<tr>
					<td colspan="2"><a href="mytag_main.php">自定义宏标记</a> - 修改自定义宏标记</td>
				</tr>
				<tr>
					<td width="260">所属栏目：</td>
					<td>
						<?php
						$tl = new TypeLink(0);
						$typeOptions = $tl->GetOptionArray($row['typeid'],0,0);
						echo "<select name='typeid' class='admin-input-lg'>";
						echo "<option value='0' selected>显示在没有继承本标记的所有栏目</option>";
						echo $typeOptions;
						echo "</select>";
						?>
					</td>
				</tr>
				<tr>
					<td>标记名称：</td>
					<td><?php echo $row['tagname']?></td>
				</tr>
				<tr>
					<td>时间限制：</td>
					<td>
						<label><input name="timeset" type="radio" value="0" <?php if ($row['timeset']==0) echo 'checked';?>> 永不过期</label>
						<label><input type="radio" name="timeset" value="1" <?php if ($row['timeset']==1) echo 'checked';?>> 在设内时间内有效</label>
					</td>
				</tr>
				<tr>
					<td>开始时间：</td>
					<td><input type="text" name="starttime" id="starttime" value="<?php echo GetDateTimeMk($row['starttime'])?>" class="admin-input-md"></td>
				</tr>
				<tr>
					<td>结束时间：</td>
					<td><input type="text" name="endtime" id="endtime" value="<?php echo GetDateTimeMk($row['endtime'])?>" class="admin-input-md"></td>
				</tr>
				<tr>
					<td>正常显示文档：</td>
					<td><textarea name="normbody" id="normbody" class="admin-textarea-xl"><?php echo $row['normbody']?></textarea></td>
				</tr>
				<tr>
					<td>过期显示文档：</td>
					<td><textarea name="expbody" id="expbody" class="admin-textarea-xl"><?php echo $row['expbody']?></textarea> </td>
				</tr>
				<tr>
					<td colspan="2" align="center"><button type="submit" class="btn btn-success btn-sm">保存</button></td>
				</tr>
			</table>
		</form>
	</body>
</html>